<?PHP $this->Html->css('management', null, array('inline' => false)); ?>
<div class="utilisateur index">
	<h2>Gestion des devis archivés</h2>
	<table cellpadding="0" cellspacing="0">
	<tr>
			<th><?php echo $this->Paginator->sort('societe.raison_sociale', 'Société');?></th>
			<th><?php echo $this->Paginator->sort('Devi.date_creation', 'Date');?></th>
			<th><?php echo $this->Paginator->sort('Devi.ref_devis', 'Référence');?></th>
			<th><?php echo $this->Paginator->sort('Devi.statut_perso', 'État');?></th>
			<th class="actions"><?php echo __('Actions');?></th>
	</tr>
	<?php
	foreach ($anciensDevis as $devis): ?>
	<tr>
		<td><?php echo h($devis['societe']['raison_sociale']); ?>&nbsp;</td>
		<td><?php echo h(strftime("%d %b %Y", strtotime($devis['Devi']['date_creation']))); ?>&nbsp;</td>
		<td><?php echo h($devis['Devi']['ref_devis']); ?>&nbsp;</td>
		<td><?php echo h($devis['Devi']['statut_perso']); ?>&nbsp;</td>
		<td class="actions">
			<?php echo $this->Html->link(__('Voir'), array('action' => 'edit', 'id_devis' => $devis['Devi']['id_devis'])); ?>
			<?php echo $this->Html->link(__('PDF'), array('action' => 'formatPdf', 'id_devis' => $devis['Devi']['id_devis'])); ?>
			<?php echo $this->Html->link(__('Dupliquer'), array('action' => 'dupliquer', 'id_devis' => $devis['Devi']['id_devis'])); ?>
			<?php //echo $this->Html->link(__('Modifier'), array('action' => 'edit', $anciensDevis['Devi']['id_devis'])); ?>
			<?php //echo $this->Form->postLink(__('Supprimer'), array('action' => 'delete', $anciensDevis['Devi']['id_devis']), null, __('Êtes vous sur de vouloir supprimer le devis "%s" ?', $anciensDevis['Devi']['id_devis'])); ?>
		</td>
	</tr>
<?php endforeach; ?>
	</table>
	
	<p>
	<?php
		echo $this->Paginator->counter(array(
		'format' => __('Page {:page} sur {:pages}')
		));
	?>	</p>
	
	<div class="paging">
	<?php
		echo $this->Paginator->prev('< ' . __('précédent'), array(), null, array('class' => 'prev disabled'));
		echo $this->Paginator->numbers(array('separator' => ''));
		echo $this->Paginator->next(__('suivant') . ' >', array(), null, array('class' => 'next disabled'));
	?>
	</div>
	
</div>
<div class="actions">
	<h3><?php echo __('Vous pouvez aussi ...'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('Créer un devis'), array('controller' => 'societes', 'action' => 'creer')); ?></li>
		<li><?php echo $this->Html->link(__('Consulter les devis en cours'), array('controller' => 'devis', 'action' => 'devisEnCours')); ?></li>
	</ul>
</div>